<template>
	<view>
		<u-navbar leftIconSize="0px" title="商家功能列表" :placeholder="true" bgColor="#3ACD90"  :titleStyle="{ color: '#FFFFFF', fontSize: '40rpx' }"></u-navbar>

		
		<view class="center-second mtlr30">
			<view class="mtlr30" >
				<view class="pt30">
					<view style="font-size: 40rpx;">常用功能</view>
				</view>
				<view class="mt30" >
					
					<view style="display: flex;align-items: center;margin-top: 20rpx;justify-content: space-between;">
					<view class="use-icon" @click="dataview">
						<view >
							<u--image width="80rpx" height="80rpx" src="/static/image/five.png"></u--image>
						</view>
						<view style="font-size: 24rpx;">
							数据总和
						</view>
					</view>
					<view class="use-icon" @click="mendianview" >
						<view >
							<u--image width="80rpx" height="80rpx" src="/static/image/mendian.png"></u--image>
						</view>
						<view style="font-size: 24rpx;">
							门店设置
						</view>
					</view>
					
					<view class="use-icon" @click="shoukuanview"  >
						<view>
							<u--image width="80rpx" height="80rpx" src="/static/image/shoukuan.png"></u--image>
						</view>
						<view style="font-size: 24rpx;">
							收款码管理
						</view>
					</view>
					
					<view class="use-icon" @click="zizhuview" >
						<view >
							<u--image width="80rpx" height="80rpx" src="/static/image/zizhu.png"></u--image>
						</view>
						<view style="font-size: 24rpx;">
							自助进件
						</view>
					</view>
					
					</view>
				</view>
			</view>
		<view class="mtlr30" >
				<view >
					
					<view style="display: flex;align-items: center;margin-top: 20rpx;justify-content: space-between;">
					<view class="use-icon" >
						<view >
							<u--image width="80rpx" height="80rpx" src="/static/image/caiwu.png"></u--image>
						</view>
						<view style="font-size: 24rpx;">
							财务数据
						</view>
					</view>
					
					
					<view class="use-icon"  style="margin-left: -10rpx;">
						<view>
							<u--image width="90rpx" height="80rpx" src="/static/image/shebei.png"></u--image>
						</view>
						<view style="font-size: 24rpx;">
							我的设备
						</view>
					</view>
					
					<view class="use-icon" style="margin-left: 0px;">
						<view >
							<u--image width="90rpx" height="80rpx" src="/static/image/jiaojie.png"></u--image>
						</view>
						<view style="font-size: 24rpx;">
							交接班
						</view>
					</view>
					
					<view class="use-icon" >
						<view >
							<u--image width="80rpx" height="80rpx" src="/static/image/biaoshitu.png"></u--image>
						</view>
						<view style="font-size: 24rpx;">
							标识
						</view>
					</view>
					
					</view>
				</view>
			</view>
		</view>
		
		
		<view style="margin-top: 60rpx;" class="mtlr30">
			<u-button @click="logout" type="primary" text="退出登陆" color="#3ACD90" size="large"></u-button>
		</view>
	</view>
	
</template>

<script>
import {
	merlogout
} from "@/common/apis/login.js"
export default {
	components: {

	},
	data() {
		return {
			
			

		}
	},
	onShow(){
		let token = uni.getStorageSync('mertoken')
		let exp = uni.getStorageSync('merexp')
		const now = Math.floor(Date.now() / 1000);
		
		if(!token || exp < now){
			this.$Router.push({
				path: '/pages/index/merlogin'
			})
		}
	},
	methods: {
		
		dataview(){
			this.$Router.push({
				path: '/pages/mer/dataview',
				query:{id:1}
			})
		},
		mendianview(){
			this.$Router.push({
				path: '/pages/mer/mendian'
			})
		},
		shoukuanview(){
			this.$Router.push({
				path: '/pages/mer/shoukuan'
			})
		},
		zizhuview(){
			this.$Router.push({
				path: '/pages/mer/zizhu'
			})
		},
		logout(){
			uni.removeStorageSync('mertoken');
			uni.removeStorageSync('meruserinfo');
			uni.removeStorageSync('merexp');
			this.$Router.pushTab({
				path: '/pages/tabBar/target'
			})
		}
	}
}
</script>

<style scoped>
.center-box{
	background-color: #ffffff;
	margin-top: -250rpx;
	border-radius: 20rpx;	
}
.userNumStyle{
	background-color: #FF6C2C;
	color:#ffffff;
	border-radius: 10rpx;	
	padding:0 8rpx;
	
}
.center-second{
	margin-top: 20rpx;
	background-color: #ffffff;
	border-radius: 20rpx;
	padding-bottom: 40rpx;

}
.use-icon{
	display: flex;
	flex-direction: column;
	align-items: center;
	margin-left:20rpx
}
</style>